EMT Practice Test

1. Question Content...


Question List

Question1: A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross site scripting vulnerability?

Question2: A developer is writing tests for a class and needs to insert records to validate functionality.
Which annotation method should be used to create record for every method in the test class?

Question3: Which code displays the contents of a Visualforce page as a PDF?

Question4: Which three statements are true regarding custom exceptions in Apex? (Choose three.)

Question5: Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

Question6: A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?

Question7: What should be used to create scratch orgs?

Question8: A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?

Question9: As part of new feature development, a developer is asked to build a responsive application capable of responding to touch events, that will be executed on stateful clients.
Which two technologies are built on a framework that fully supports the business requirement? Choose 2 answers

Question10: AW Computing tracks order information in custom objects called order__c and order_Line_ c - Currently, all shipping information is stored in the order__c object.
The company wants to expand Its order application to support split shipments so that any number of order_Line__c records on a single order__c can be shipped to different locations.
What should a developer add to fulfill this requirement?

Question11: Which three data types can a SOQL query return?
Choose 3 answers

Question12: What are two considerations for deploying from a sandbox to production?
Choose 2 answers

Question13: Universal Containers has a Visualforce page that displays a table of every Container__c being rented by a given Account. Recently this page is failing with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

Question14: A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.
What is the first step towards troubleshooting the issue?

Question15: Einstein Next Best Action Is configured at Universal Containers to display recommendations to internal users on the Account detail page.
If the recommendation is approved, a new opportunity record and task should be generated. If the recommendation is rejected, an Apex method must be executed to perform a callout to an external system.
Which three factors should a developer keep Hi mind when implementing the Apex method?
Choose 3 answers

Question16: Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers

Question17: Which two are best practices when it comes to component and application event handling? (Choose two.)

Question18: A developer wants to mark each Account in a List<Account> as either or Inactive based on the LastModified field value being more than 90 days.
Which Apex technique should the developer use?

Question19: Which annotation exposes an Apex class as a RESTful web service?

Question20: An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update the Flow to also create a Contact and store the created Contact's ID on the Opportunity.
Which update should the developer make in the Flow?

Question21: A custom Visualforce controller calls the ApexPages,addMessage () method, but no messages are rendering on the page.
Which component should be added to the Visualforce page to display the message?

Question22: How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?

Question23: What are two benefits of using declarative customizations over code?
Choose 2 answers

Question24: An Apex method, getAccounts, that returns a list of Accounts given a searchTern, is available for Lightning Web Components to use.
What is the correct definition of a Lightning Web Component property that uses the getAccounts method?

Question25: Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_Support__c.
Users should be able to associate multiple engineering_Support__c records to a single Opportunity record.
Additionally, aggregate Information about the Engineering_support__c records should be shown on the Opportunity record.
What should a developer Implement to support these requirements?

Question26: Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.
Which Visualforce feature supports this requirement?

Question27: When a user edits the Postal Code on an Account, a custom Account text field named ''Timezone'' must be updated based on the values another custom object object called.
What is the optimal way to Implement this feature?

Question28: How can a developer check the test coverage of active Process Builder and Flows deploying them in a Changing Set?

Question29: Universal Container* decides to use purely declarative development to build out a new Salesforce application.
Which two options can be used to build out the business logic layer for this application?
Choose 2 answer

Question30: In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?

Question31: A company has been adding data to Salesforce and has not done a good Job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together.
Which two statements are valid considerations when using merged?
Choose 2 answers

Question32: Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional layer of validation using automation.
What would be the best solution for this requirement?

Question33: When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers

Question34: In the following example, which sharing context will myMethod execute when it is invoked?

Question35: The following automations already exist on the Account object;
* A workflow rule that updates a field when a certain criteria is met
* A custom validation on a field
* A How that updates related contact records
A developer created a trigger on the Account object.
What should the developer consider while testing the trigger code?

Question36: A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use data Loader instead of Data Import Wizard?

Question37: What is an example of a polymorphic lookup field in Salesforce?

Question38: A developer created a trigger on a custom object. This custom object also has some dependent pick lists.
According to the order of execution rules, which step happens first?

Question39: An org tracks customer orders on an Order object and the items of an Order on the Line Item object. The Line Item object has a MasterDetail relationship to the order object. A developer has a requirement to calculate the order amount on an Order and the line amount on each Line item based on quantity and price.
What is the correct implementation?

Question40: Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned" as ipicklist value for the Statu3__c custom field within the Container__c object.
Which two approaches could a developer use to enforce only Container records with a status of
"Decommissioned" can be deleted?
Choose 2 answers

Question41: Which scenario is valid for execution by unit tests?

Question42: A developer created these three Rollup Summary fields in the custom object, Project_ct,

The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.
Which should the developer use to Implement the business requirement in order to minimize maintenance overhead?

Question43: For which three items can 2 trace flag be configured?
Choose 3 answers

Question44: A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service agent must gather many pieces of information. A developer is tasked to implement this functionality.
What should the developer use to satisfy this requirement in the most efficient manner?

Question45: A company has a custom object, Order__c, that has a required, unique external ID field called OrderNumber__c.
Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of order__c records using the external ID field?

Question46: Which statement describes the execution order when trigger are associated to the same object and event?

Question47: If apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which statement are true regarding governor limits? Choose 2 answers

Question48: Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.
Which approach should a developer take to ensure calculateBodyFat() is accessible outside the package namespace?

Question49: While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.
Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Question50: Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?

Question51: Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?

Question52: Given the following Apex statement:

What occurs when more than one Account is returned by the SOQL query?

Question53: A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?

Question54: A developer created a Lightning web component called statusComponent to be inserted into the Account record page.
Which two things should the developer do to make the component available?

Question55: A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.
What is the most efficient way for a developer to implement this?

Question56: A developer is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively.
Which design framework should the developer consider to ensure scalability and maintainability?

Question57: A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?

Question58: What are two considerations for running a flow in debug mode?
Choose 2 answers

Question59: Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own. What should the developer use to enforce sharing permission for the currently logged-in user while using the custom search tool?

Question60: What are three ways for a developer to execute tests in an org? Choose 3.

Question61: A Salesforce Administrator used Flow Builder to create a flow named ''accountOnboarding''. The flow must be used inside an Aura component.
Which tag should a developer use to display the flow in the component?

Question62: A developer must perform a complex SOQL query that joins two objects in a Lightning component. How can the Lightning component execute the query?

Question63: Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).
What should the UC development team use to automatically run tests as part of their CI process?

Question64: Which three resources in an Azure Component can contain JavaScript functions?

Question65: A developer wrote an Apex method to update a list of Contacts and wants to make it available for use by Lightning web components.
Which annotation should the developer add to the Apex method to achieve this?

Question66: Given the following code snippet, that is part of a custom controller for a Visualforce page:

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers

Question67: What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers

Question68: Universal Containers stores the availability date on each Line Item of an Order and Orders are only shipped when all of the Line Items are available. Which method should be used to calculate the estimated ship date for an Order?

Question69: n org has an existing flow that creates an Opportunity with an Update Records element. A developer must update the flow to aiso create a 'Contact and store the created Contact's 1D on the Opportunity.
Which update must the developer make in the flow?

Question70: A developer Is Integrating with a legacy on-premise SQL database.
What should the developer use to ensure the data being Integrated is matched to the right records in Salesforce?

Question71: Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered.
What is the best practice to get the sum of all Order Line item totals on the Order record?

Question72: Universal Container wants Opportunities to no longer be editable when itreaches the Closed/Won stage.
Which two strategies can a developer use to accomplish this?
Choose2 answer

Question73: A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default } | Opportunity record type, and set certain default values based on the record type before inserting the record.
How can the developer find the current user's default record type? ns

Question74: Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient.
The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The Developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address". Which field should the developer ad to create the most efficient model that supports the business need?

Question75: The Job_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master. As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is 'Technology' while also retrieving the contact's Job_Application__c records.
Based on the object's relationships, what is the most efficient statement to retrieve the list of contacts?

Question76: Universal Container uses Service Cloud with a custom field, stage_c, on the Case object.
Management wants to send a follow-up email reminder 6 hours after the stage_c field is set to '';Waiting on customer'' The .... Administrator wants to ensure the solution used is bulk safe.
Which two automation tools should a developer recommend to meet these business requirements?
Choose 2 answers

Question77: Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name.
What is the best solution to assign the case to the appropriate support representative?

Question78: Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?

Question79: A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct implementation to use the PaymentProcessor interface class?

Question80: Universal Container wants Opportunities to no longer be editable when reaching the Clousd stage.
How should a develoiper accomplish this?

Question81: What should a developer use to script the deployment and unit test execution as part of continuous integration?

Question82: Which salesforce org has a complete duplicate copy of the production org including data and configuration?

Question83: In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce? Choose 2 answers

Question84: Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce.
How should the Order Number field be defined in Salesforce?

Question85: Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry:

When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers

Question86: A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debtAmount' should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time? Choose 2 answers

Question87: Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.

When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce page.
What can the developer use to meet this business requirement?

Question88: When a user edits the Postal Code on an Account, a custom Account text field named ''Timezone'' must be updated based on the values in a postalCodeToTimezone_c custom object.
What should be built to implement this feature?

Question89: How does the Lightning Component framework help developers implement solutions faster?

Question90: Which exception type cannot be caught?

Question91: A developer needs to create a baseline set of data (Account, Contacts, Products, Assets) for an entire suite allowing them to test independent requirements for various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?

Question92: What is the result of the following code?

Question93: A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?

Question94: A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers

Question95: A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message 'Maximum trigger depth exceeded', What could be the possible causes?

Question96: A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org. Which tool should the developer use to troubleshoot?

Question97: What can be used to override the Account's standard Edit button for Lightning Experience?